unit Login;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, XPMan,DBModule,ErrWork,MyTimer;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Edit2: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Button1: TButton;
    XPManifest1: TXPManifest;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  curUser: TUser;
implementation

uses SelectFace, GakseyFace;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  curUser:=TUser.Create(Self);
  Case FlushConnect() of
  -1: ErrExcept(mg_SetsClearErr);
  1: Case SetDB(Edit1.Text,Edit2.Text) of
      -1: ErrExcept(mg_FileParceErr);
      -2: ErrExcept(mg_SetsReadErr);
      -3: ErrExcept(mg_DBConnectErr);
      1:  CASE ReadPermission(nowuser,curUser) of
            -1: ErrExcept(mg_NoPermErr);
            1:  Case CreateMenu(curUser) of
                  -1: ErrExcept(mg_MenuCreateErr);
                  1: begin
                      //StartValue();
                      Form1.Hide;
                      Form3.ShowModal;
                     end;
                end;
          end;
      end;
  end;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  Form8.Showmodal;
end;

end.
